<template>
  <div class="header vux-1px-b">
    <img v-show="showCloseBtn" src="../assets/img/ic/close_popup@2x.png" alt="">
    <img v-show="!showCloseBtn" src="../assets/img/ic/back_gray_title@2x.png" alt="" @click="goBack">
    <h3 class="head_title">{{title}}</h3>
  </div>
</template>

<script>
  export default {
    props:{
      'title':String,
      'showCloseBtn':{
        type:Boolean,
        default:false
      }
    },
    methods : {
      goBack(){
        this.$router.back(-1)
      }
    }
  }
</script>

<style lang="less">
.header{
  position: relative;
  height: 88px;
  background: #ffffff;
  img{
    width: 48px;
    height: 48px;
    position: absolute;
    left: 20px;
    top: 20px;
  }
  .head_title{
    text-align: center;
    font-size: 36px;
    color: #262626;
    line-height: 88px;
    font-weight: bold;
  }
}
</style>
